﻿using System;
using System.Data;
using System.Data.SqlClient;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Tong;
public partial class SQL存储过程_创建数据库 : System.Web.UI.Page
{
    /// <summary>
    /// 操作通用类
    /// </summary>
    public TongUse1 TextData = new TongUse1();
    protected void Page_Load(object sender, EventArgs e)
    {
        string sql = "";//设定SQL
        sql = " create alert(@aa) begin aaa ";//创建数据库
         /* 
         (  NAME = 名称 , 
            FILENAME = 文件名称,
            SIZE = 起始大小 ,
            MAXSIZE = { 最大限制 | UNLIMITED } ,
            FILEGROWTH = 增长量  )
        */
        Response.Write(TextData.ExSql(sql));
       // SQL执行(sql,ConfigurationManager.AppSettings["SqlConn"]);

    }
    private static void SQL执行(string SQL语句, string 数据库联接字符串)
    {
        using (SqlConnection connection = new SqlConnection(数据库联接字符串))
        {
            SqlCommand command = new SqlCommand(SQL语句, connection);
            command.Connection.Open();
            command.ExecuteNonQuery();
        }
    }
}
